package com.xydtech.ecard.ecard.service.impl;

import com.xydtech.common.core.text.Convert;
import com.xydtech.ecard.ecard.domain.EcardPriorCreditTransferRecord;
import com.xydtech.ecard.ecard.mapper.EcardPriorCreditTransferRecordMapper;
import com.xydtech.ecard.ecard.service.IEcardPriorCreditTransferRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 移交预授信记录Service业务层处理
 * 
 * @author xydtech
 * @date 2024-05-16
 */
@Service
public class EcardPriorCreditTransferRecordServiceImpl implements IEcardPriorCreditTransferRecordService 
{
    @Autowired
    private EcardPriorCreditTransferRecordMapper ecardPriorCreditTransferRecordMapper;

    /**
     * 查询移交预授信记录
     * 
     * @param id 移交预授信记录主键
     * @return 移交预授信记录
     */
    @Override
    public EcardPriorCreditTransferRecord selectEcardPriorCreditTransferRecordById(Long id)
    {
        return ecardPriorCreditTransferRecordMapper.selectEcardPriorCreditTransferRecordById(id);
    }

    /**
     * 查询移交预授信记录列表
     * 
     * @param ecardPriorCreditTransferRecord 移交预授信记录
     * @return 移交预授信记录
     */
    @Override
    public List<EcardPriorCreditTransferRecord> selectEcardPriorCreditTransferRecordList(EcardPriorCreditTransferRecord ecardPriorCreditTransferRecord)
    {
        return ecardPriorCreditTransferRecordMapper.selectEcardPriorCreditTransferRecordList(ecardPriorCreditTransferRecord);
    }

    /**
     * 新增移交预授信记录
     * 
     * @param ecardPriorCreditTransferRecord 移交预授信记录
     * @return 结果
     */
    @Override
    public int insertEcardPriorCreditTransferRecord(EcardPriorCreditTransferRecord ecardPriorCreditTransferRecord)
    {
        return ecardPriorCreditTransferRecordMapper.insertEcardPriorCreditTransferRecord(ecardPriorCreditTransferRecord);
    }

    /**
     * 修改移交预授信记录
     * 
     * @param ecardPriorCreditTransferRecord 移交预授信记录
     * @return 结果
     */
    @Override
    public int updateEcardPriorCreditTransferRecord(EcardPriorCreditTransferRecord ecardPriorCreditTransferRecord)
    {
        return ecardPriorCreditTransferRecordMapper.updateEcardPriorCreditTransferRecord(ecardPriorCreditTransferRecord);
    }

    /**
     * 批量删除移交预授信记录
     * 
     * @param ids 需要删除的移交预授信记录主键
     * @return 结果
     */
    @Override
    public int deleteEcardPriorCreditTransferRecordByIds(String ids)
    {
        return ecardPriorCreditTransferRecordMapper.deleteEcardPriorCreditTransferRecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除移交预授信记录信息
     * 
     * @param id 移交预授信记录主键
     * @return 结果
     */
    @Override
    public int deleteEcardPriorCreditTransferRecordById(Long id)
    {
        return ecardPriorCreditTransferRecordMapper.deleteEcardPriorCreditTransferRecordById(id);
    }
}
